/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package snmpapplication;

import java.util.logging.Level;
import java.util.logging.Logger;
import snmpapplication.gui.AppLoadingWindow;
import snmpapplication.log.Logging;
import snmpapplication.utils.Constante;
import snmpapplication.utils.DevicesManager;

/**
 * Source of all Evil!
 * 
 * Class used for loading user preferences and for initializing all OID variables.
 * @author APetcu
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static Logging log;

    public static void main(String[] args) {

        // start logger
        log = new Logging();

        try {
            // load default OIDs
            Constante.initializareOids();

            // load preferences

            // load added devices
            DevicesManager.loadDevices();

            // let's look and feel a little
            Constante.setUI();

        } catch (Exception ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }

        // load gui and wait for the magic to happen
        AppLoadingWindow apl = new AppLoadingWindow();
        apl.setVisible(true);

    }
}
